#region Summary

// 
// Owner : JackieHan 
// 
// Solution : DailyCollection 
// 
// Project : Jackie.Utility.Condition
// 
// File : Greater.cs
// 
// CopyRight : Copyright © 2010-2011 Skomart Corporation, All Rights Reserved 
// 
// Summary : 关键字大于的定义
// 
// History : 
//			2011-05-26 11:20:22	    Create 
// 

#endregion

#region Using

using System;
using System.Text.RegularExpressions;
using Jackie.Utility.Condition.Domain.Interface;

#endregion

namespace Jackie.Utility.Condition.Domain.Define
{
    /// <summary> 
    /// 关键字大于的定义
    /// </summary>
    public class Greater : IKeyWord
    {
        private const string GreaterKeyWordRegex = "^>$";

        private const int GreaterKeyWordLength = 1;

        public bool Is(string text)
        {
            var regex = new Regex(GreaterKeyWordRegex);
            return regex.IsMatch(text);
        }

        public int Lenght
        {
            get { return GreaterKeyWordLength; }
        }

        public override string ToString()
        {
            return "Greater";
        }
    }
}